<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>变量常量</title>
</head>
<body>
    <script>
        //1.定义局部变量
        let name = "张雪";
        let age = "18";
        document.write(name+","+age+"<br>");
    
        //2.定义全局变量
        {
            a="abc";
            let b="zx";
        }
       // document.write(b);
        document.write(a);

    
        //3.定义变量
        const ip =3.1415926;
       // ip = 3.15;
        document.write(ip);
    </script>
    
</body>
</html>